import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../components/Home.vue'
import NewsList from '../components/NewsList.vue'
import NewsDetail from '../components/NewsDetail.vue'
import PhotoList from '../components/PhotoList.vue'
import PhotoInfo from '../components/PhotoInfo.vue'
import GoodsList from '../components/GoodsList.vue'
import GoodsDetail from '../components/GoodsDetail.vue'
import ShopCar from '../components/ShopCar.vue'
import Search from '../components/Search.vue'
import Coupon from '../components/Coupon.vue'
import Map from '../components/Map.vue'
import Validate from '../components/Validate.vue'
import Member from '../components/Member.vue'
Vue.use(VueRouter)

const routes = [
  {path:'/',redirect:'/home'},
  {path:'/home',component:Home},
  {path:'/newslist',component:NewsList},
  {path:'/newsdetail/:id',component:NewsDetail},
  {path:'/photolist',component:PhotoList},
  {path:'/photoinfo/:id',component:PhotoInfo},
  {path:'/goodslist',component:GoodsList},
  {path:'/goodsdetail/:id',component:GoodsDetail},
  {path:'/shopcar',component:ShopCar},
  {path:'/search',component:Search},
  {path:'/coupon',component:Coupon},
  {path:'/map',component:Map},
  {path:'/validate',component:Validate},
  {path:'/member',component:Member}
]

const router = new VueRouter({
  routes
})

export default router

